Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selector proposal #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lucasconstantino
Copy link
Contributor

Redux-boot does not rely on combinators. Sometimes when we need to simply attach reducers from other projects the code can be unnecessarily big. Take as an example the usage of redux-form reducer:

import { reducer } from 'redux-form'

const formModule = {
  reducer: (state, action) => ({
    ...state,
    form: reducer(state.form, action)
  })
}

This is not really bad, but maybe we could do the following:

import { reducer } from 'redux-form'

const formModule = {
  selector: 'form',
  reducer
}

Basically, what this pull-request accomplishes is wrap any reducer and resolve "selector" paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant